package net.melon.agency.inst.ssh.service;

import java.util.List;

import net.esj.basic.core.view.tools.searcher.Searcher;
import net.esj.basic.pojo.op.Operator;
import net.esj.basic.utils.Pagination;
import net.melon.agency.pojo.Agency;

public interface AgencyService {

	Agency saveAgency(Agency agency , Operator operator);
	
	Agency updateAgency(Agency agency);
	
	Agency getAgency(String id);
	
	void deleteAgency(String agencyId);
	
	Pagination<Agency> pageAgency(Pagination pagination,String parentName); 
	
	List<Agency> listAgency(Searcher searcher);

	boolean checkAgencyExist(Agency agency);

	boolean checkAgencyUserNameExist(String name);

	Agency getAgencyByName(String name);

	List<Agency> getAllUnderAgencyByOperator(Operator operator);
	
	/**
	 * 
	 * 获取相同代理商下的所有代理商ID
	 * 
	 * */
	List<String> getAgencyLowerLevel(String parentId);

	List<Agency> listAgencyByCity(Long citySession);
	
}
